package com.zrx.govern.component.easyexcel.starter.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangxiaowei
 * @version V1.0
 */

@Getter
@AllArgsConstructor
public enum FieldDataTypeEnum {

    NUMBER("NUMBER"),
    STRING("STRING"),
    DATE("DATE");

    private String dataType;

    public static FieldDataTypeEnum getFieldDataTypeEnum(String dataType) {
        for (FieldDataTypeEnum fieldDataTypeEnum : FieldDataTypeEnum.values()) {
            if (fieldDataTypeEnum.getDataType().equalsIgnoreCase(dataType)) {
                return fieldDataTypeEnum;
            }
        }
        return STRING;
    }

}
